<template>
	<view class="new-board">
		<header-bar color="black"></header-bar>
		<view class="board">
			<text class="title">新建/编辑画板</text>
			<view class="form">
				<view class="input form-item">
					<text class="title">画板标题</text>
					<input type="text" value="" placeholder="请输入画板标题" />
				</view>
				<view class="form-item select-item">
					<text class="title">分类</text>
					<view class="select">
						<text @click="activeCate = index" :class="{active: activeCate === index}" v-for="(cate,index) in cateList" :key='index'>{{cate}}</text>
					</view>
				</view>
				<view class="form-item select-item">
					<text class="title">类型</text>
					<view class="select"> 
						<text @click="activeType = index" :class="{active: activeType === index}"  v-for="(type,index) in typeList" :key='index'>{{type}}</text>
					</view>
				</view>
				<view class="form-item tag-item">
					<text class="title">标签</text>
					<view class="tag">
						<view class="add-tag">
							<input type="text" value="" placeholder="请输入3-5个字" />
							<view></view>
						</view>
						<view class="tag-list">

						</view>
					</view>
				</view>
				<view class="input form-item">
					<text class="title">描述</text>
					<input type="text" value="" placeholder="请输入画板描述" />
				</view>
			</view>
		</view>
		
		<view class="create-board-box">
					<view class="create-board">创建画板</view>
		</view>
	</view>
</template>

<script>
	import HeaderBar from '@/components/headerBar.vue'
	export default {
		components: {
			HeaderBar
		},
		data() {
			return {
				cateList: ['手机','电脑'],
				typeList: ['原创','收藏'],
				activeType: 0,
				activeCate: 0,
			}
		},
		methods: {

		}
	}
</script>

<style lang="less" scoped>
	.new-board {
		position: relative;
		width: 100%;
		min-height: 100%;
		.board {
			margin-top: 180upx;
			width: 100%;
			padding:  0 40upx;
			box-sizing: border-box;
			display: flex;
			flex-direction: column;
			justify-content: flex-start;

			.title {
				color: rgba(16, 16, 16, 100);
				font-size: 48upx;
				text-align: left;
				font-family: PingFangSC-bold;
				margin-bottom: 74upx;
			}

			.form {
				width: 100%;
				display: flex;
				flex-direction: column;

				.input {
					display: flex;
					flex-direction: row;
					align-content: center;
					justify-content: space-between;
					input {
						border-left: 2upx solid #101010;
						width: 520upx;
						padding: 0 10upx;
						box-sizing: border-box;
					}
				}
				.select-item {
					width: 100%;
					display: flex;
					flex-direction: row;
					align-content: center;
					justify-content: center;
					.select {
						flex: 1;
						display: flex;
						flex-direction: row;
						align-items: flex-start;
						text {
							width: 108upx;
							height: 60upx;
							line-height: 60upx;
							border-radius: 54upx;
							background-color: rgba(255, 255, 255, 100);
							border: 2upx solid rgba(16, 16, 16, 100);
							color: rgba(16, 16, 16, 100);
							font-size: 28upx;
							text-align: center;
							font-family: -apple-system;
						}
						.active {
							background-color: rgba(16, 16, 16, 100);
							color: rgba(255, 255, 255, 100);
							border: 2upx solid rgba(255, 255, 255, 100);
						}
						text:nth-child(1) {
							margin-right: 40upx;
						}
					}
				}
				.tag-item {
					display: flex;
					flex-direction: row;
					.tag {
						display: flex;
						flex-direction: column;
						.add-tag {
							input {
								border-left: 2upx solid #101010;
								width: 520upx;
								padding: 0 10upx;
								box-sizing: border-box;
							}
						}
					}
				}
				.form-item {
					width: 100%;
					height: 100upx;
					margin-bottom: 40upx;
					.title {
						display: inline-block;
						width: 120upx;
						text-align: justify;
						color: rgba(153, 153, 153, 100);
						font-size: 28upx;
						font-family: PingFangSC-regular;
						margin-right: 40upx;
					}
				}
			}
		}
		.create-board-box {
			position: fixed;
			bottom: 128upx;
			width: 100%;
			display: flex;
			flex-direction: row;
			align-items: center;
			justify-content: center;
		}
		.create-board {
			width: 670upx;
			height: 110upx;
			line-height: 110upx;
			border-radius: 55upx;
			background-color: rgba(16, 16, 16, 100);
			color: rgba(255, 255, 255, 100);
			font-size: 28upx;
			text-align: center;
			font-family: -apple-system;
			border: 2upx solid rgba(255, 255, 255, 100);
		}
	}
</style>
